import _ from "lodash";
import fs from "fs";
// 获取当前文件状态

export function stat(path: string): Promise<fs.Stats> {
  return new Promise((res, rej) => {
    fs.stat(path, (err, stats) => {
      if (!_.isEmpty(err)) {
        rej(err);
      } else {
        res(stats);
      }
    });
  });
}
